﻿using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;

using HttpIntfLib;

namespace NetPortDriver
{
    public class Program
    {
        public static void Main()
        {
            //SampleTests.BlinkTest();
            //HTTPListener.KickOffPortMapperHttp();
            //HTTPListener.KickOffHttpService();
            HTTPListener.kickOffThreadHttp();
            BlinkTest();
        }


        public static void BlinkTest()
        {
            // write your code here
            OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);
            //OutputPort ledD0 = new OutputPort(Pins.GPIO_PIN_D0, false);

            Debug.Print("Blink Test");

            while (true)
            {
                led.Write(true); 
                Thread.Sleep(100);
                led.Write(false); 
                Thread.Sleep(250);
            }
        }

    }
}
